import com.aaa.entity.Comment;
import com.aaa.entity.FrontUser;
import com.aaa.entity.Praise;
import com.aaa.entity.Video;
import com.aaa.mapper.FrontUserMapper;
import com.aaa.mapper.VideoMapper;
import com.aaa.service.impl.*;
import com.aaa.start;
import com.aaa.util.secl;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import sun.rmi.runtime.Log;

import javax.xml.crypto.Data;
import java.time.LocalTime;
import java.util.List;
import java.util.Map;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = {start.class})
@Slf4j
public class T {
    @Autowired
    FrontUserMapper frontUserService;
    @Autowired
    VideoMapper videoMapper;
    @Autowired
    SubscriptionFansServiceImpl subscriptionFansService;
    @Autowired
    CommentServiceImpl commentService;
    @Autowired
    PraiseServiceImpl praiseService;
    @Autowired
    PrivateMessageServiceImpl privateMessageService;
    @Autowired
    secl secl;



    @Test
    public void t1(){
        List<Map<String, Object>> selectuser = frontUserService.seleuser(1, 3);
    }

    @Test
    public void t2(){
        List<Video> userid = videoMapper.userid(null,2 );
    }

    @Test
    public void t3(){
//        List<Map<String, Object>> login = frontUserService.login("123", "123");
//        log.info(String.valueOf(login));

//        List<Map<String, Object>> seleatten = subscriptionFansService.seleatten(1);
//        log.info(seleatten.toString());
//        videoMapper.seleone(6,null);
//        praiseService.add(6,3,1,"付饶");
      //  commentService.addtop(4,"邓飞虎",6,"真好");
//        List<Map<String, Object>> selecomment = commentService.selecomment(6,4);
//        log.info(selecomment.toString());
//        privateMessageService.seleinform(1);
//        privateMessageService.seleone(2,1);
//        commentService.addtwe(4,"邓飞虎",6,2,4,"你也不赖");
//        Comment comment = new Comment();
//        comment.setUid(4);
//        comment.setUname("邓飞虎");
//        comment.setVid(6);
//        comment.setParentId(2);
//        comment.setReplyId(11);
//        comment.setReplyName("邓飞虎");
//        comment.setContent("你也不赖");
//        commentService.addtworeply(comment,4);
//        Integer whole = secl.whole(LocalTime.now());
//        String whole = secl.whole(LocalTime.now());
//        log.info(whole);

        FrontUser frontUser = new FrontUser();
        frontUser.setUname("Biubiu");
        frontUser.setPassword("123");
        frontUser.setPhone("13137731741");
        frontUser.setPhoto("/user");
        frontUser.setSex("0");
//        frontUserService.add(frontUser);


    }


}
